#ifndef FILEINFO_H
#define FILEINFO_H

#include <string>
#include <vector>



struct RevInfo
{

    static std::string getCurrentDate();

    RevInfo(std::string user, std::string comment) : user(user), comment(comment), date(getCurrentDate()) {}
    std::string user;
    std::string comment;
    std::string date;

};


struct FileInfo
{
    std::string filename;
    std::vector<std::string> owners;
    std::vector<RevInfo> revisions;

    int version;
    bool checkedOut;
    std::string checker;
    FileInfo(std::string filename = "", std::string owner = "");
    bool ownedBy(std::string user);
    void checkIn(std::string user, std::string comment);

    std::string toFileList();
    std::string getVersionString(int version);


};

#endif // FILEINFO_H
